package com.company.cloud.user.modules.api.service;

import com.company.cloud.common.bean.BaseClientResult;
import com.company.cloud.user.modules.api.fallback.UrlAuthPlatformRemoteServiceFallbackFactory;
import com.company.cloud.user.modules.api.request.*;
import com.company.cloud.user.modules.api.response.AuthUrlConfigQueryResp;
import com.company.cloud.user.modules.api.response.AuthUrlConfigResp;
import com.company.common.server.constant.ServiceNameConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@FeignClient(contextId = "urlAuthPT", name = ServiceNameConstant.user_center, fallbackFactory = UrlAuthPlatformRemoteServiceFallbackFactory.class)
public interface UrlAuthPlatformRemoteService {



    /**新增URL权限配置*/
    @RequestMapping(value = "/remote/user/authUrlConfigAddBatch" ,method = RequestMethod.POST)
    public BaseClientResult<String> addAuthUrlConfigBatch(@RequestBody ServiceUrlConfigAddRequest params);

    /**初始化URL权限配置缓存*/
    @RequestMapping(value = "/remote/user/authUrlConfigInitCache" ,method = RequestMethod.GET)
    public BaseClientResult<String> initAuthUrlConfigCache();

    /**URL权限配置*/
    @RequestMapping(value = "/remote/user/authUrlConfigQuery" ,method = RequestMethod.POST)
    public BaseClientResult<AuthUrlConfigQueryResp> queryAuthUrlConfig(@RequestBody AuthUrlConfigQueryRequest request);

    /**URL权限配置*/
    @RequestMapping(value = "/remote/user/authUrlConfigAdd" ,method = RequestMethod.POST)
    public BaseClientResult<AuthUrlConfigResp> addAuthUrlConfig(@RequestBody AuthUrlConfigAddRequest request);

    /**URL权限配置*/
    @RequestMapping(value = "/remote/user/authUrlConfigUpdate" ,method = RequestMethod.POST)
    public BaseClientResult<AuthUrlConfigResp> updateAuthUrlConfig(@RequestBody AuthUrlConfigUpdateRequest request);

    /**URL权限配置*/
    @RequestMapping(value = "/remote/user/authUrlConfigGet" ,method = RequestMethod.POST)
    public BaseClientResult<AuthUrlConfigResp> getAuthUrlConfig(@RequestBody AuthUrlConfigGet2DelRequest request);

    /**URL权限配置*/
    @RequestMapping(value = "/remote/user/authUrlConfigDel" ,method = RequestMethod.POST)
    public BaseClientResult<String> delAuthUrlConfig(@RequestBody AuthUrlConfigGet2DelRequest request);
}
